package com.situ.day22;

import com.situ.day5.Teacher;
import org.junit.Test;

public class GenericDemo2 {

    public void save(Student student, Teacher teacher) {

    }

    public <K,T> K save(K k, T t) {
        return k;
    }

    @Test
    public void test1() {
        //使用泛型方法时候，确定泛型的类型
        Double result1 = save(1.0, 1);
        Float result2 = save(1.0f, 1);
        String result3 = save("abc", 23);
    }
}
